<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" href="/res/app/admin/css/common.css" rel="stylesheet" />
<script type="text/javascript" src="/res/js/lib/jquery.js"></script>
<script type="text/javascript" src="/res/frame/js/t_thickbox.js"></script>
<title>日志管理</title>

<script type="text/javascript">
    function show_log(name){
        $.ajax({
              url:'/admin/a-log/showLog',
              method:'post',
              data:'name='+name+'&cache='+Math.random(),
              dataType:'text',
              success:function(result){
                  open_thickbox(result,600,800);
               },
               error:function (e){
                 alert(e.responseText);
               }
              
            });
    }
    function del_log(name,id){
        $.ajax({
              url:'/admin/a-log/delLog',
              method:'post',
              data:'name='+name+'&cache='+Math.random(),
              dataType:'json',
              success:function(json){
                   if (json.success){
                          alert('成功删除');
                          $("#"+id).remove();
                       }else {
                   	         alert("删除失败");
                           }
                  
               },
               error:function (e){
                 alert(e.responseText);
               }
              
            });
    }
</script>
</head>
<body>

<div >您当前所在的位置：<span >日志管理</span>
</div>
<div class="clr"></div>

        <div class="mt10">
          <table id="ffc" cellpadding="0" cellspacing="0" class="t_stpi mb10" style= "table-layout:fixed ">
            <tr>
              <th width="350">文件名</th>
              <th width="50">文件大小</th>
              <th width="150">文件的更新时间</th>
              <th width="100">查看日志</th>
            </tr>
            <!-- FOREACH files -->
            <tr id="log_{ROWKEY}">
              <td  align="center">{name}</td>
              <td  align="center">{size}</td>
              <td  align="center">{update_time}</td>
              <td  align="center">
                <input type="button" onclick="show_log('{name}')" value="查看"/>
                <input type="button" onclick="del_log('{name}','log_{ROWKEY}')" value="删除"/>
              </td> 
            </tr>
            <!-- END --> 
          </table>          
          <div align="center">{pager}</div>          
        </div>

</body>
</html>



